package com.bw.polling.view

import android.app.ActionBar.LayoutParams
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bw.base.view.BaseActivity
import com.bw.polling.R
import com.bw.polling.databinding.ActivityPollingAwaitBinding

@Route(path = "/poll/await")
class PollingAwaitActivity :  BaseActivity<ActivityPollingAwaitBinding>(){
    override fun initView() {
        binding.awaitTop.tvTitle.text = "巡检代办"
        binding.awaitTop.ivBack.setOnClickListener { finish() }
        binding.awaitTop.ivMore.visibility = View.VISIBLE
        val layoutParams = binding.calendarView.layoutParams
        layoutParams.height = LayoutParams.WRAP_CONTENT
        binding.calendarView.layoutParams = layoutParams
        binding.calendarView.setOnDateChangeListener { calendarView, i, i2, i3 ->
            val selectedDate = "$i-${i2+1}-$i3"
        }
    }

    override fun initData() {
        binding.con1.setOnClickListener {
            ARouter.getInstance().build("/await/detail").navigation()
        }
        binding.con2.setOnClickListener {
            ARouter.getInstance().build("/await/detail").navigation()
        }
        binding.con3.setOnClickListener {
            ARouter.getInstance().build("/await/detail").navigation()
        }
        binding.con4.setOnClickListener {
            ARouter.getInstance().build("/await/detail").navigation()
        }
    }

}